import request from '@/utils/request'

// 导出最近的5000条账单明细
export function exportAllBillDetail(data) {
	const { method, ...rest } = data
	return request({
		url: '/billShop/exportAllDetail',
		method: method || 'GET',
		params: rest
	})
}

// 导出最近的5000条账单明细
export function exportAllBillDetails(data) {
	const { method, ...rest } = data
	return request({
		url: '/bill/exportAllDetail',
		method: method || 'GET',
		params: rest
	})
}

// 创建调账单
export function billCreate(data) {
	return request({
		url: '/billChange/create',
		method: 'POST',
		data: data
	})
}
// 人才调账列表
export function staffList(data) {
	return request({
		url: '/staffAdjust/getList',
		method: 'POST',
		data: data
	})
}
// 调账单列表
export function billList(data) {
	return request({
		url: '/billChange/getList',
		method: 'POST',
		data: data
	})
}

// 查看调账单详情
export function billInfo(data) {
	return request({
		url: '/billChange/getInfo',
		method: 'POST',
		data: data
	})
}

// 获取商户账单列表
export function billShopList(data) {
	return request({
		url: '/billShop/shopList',
		method: 'POST',
		data: data
	})
}

//商户账单-批量确认
export function shopConfirm(data) {
	return request({
		url: '/billShop/confirm',
		method: 'POST',
		data: data
	})
}

//商户账单-批量已回款
export function shopBatchPay(data) {
	return request({
		url: '/billShop/batchPay',
		method: 'POST',
		data: data
	})
}

//商户账单-单个已回款
export function shopPay(data) {
	return request({
		url: '/billShop/pay',
		method: 'POST',
		data: data
	})
}

//商户账单-批量已开票
export function shopBatchInvoice(data) {
	return request({
		url: '/billShop/batchInvoice',
		method: 'POST',
		data: data
	})
}

//商户账单-重新生成
export function shopRestartCreate(data) {
	return request({
		url: '/billShop/restartCreate',
		method: 'POST',
		data: data
	})
}

// 人才账单-批量确认
export function staffConfirmy(data) {
	return request({
		url: '/bill/confirm',
		method: 'POST',
		data: data
	})
}

// 人才账单-批量已付款
export function staffBatchPay(data) {
	return request({
		url: '/bill/batchPay',
		method: 'POST',
		data: data
	})
}

// 人才账单-单个已付款
export function staffPay(data) {
	return request({
		url: '/bill/pay',
		method: 'POST',
		data: data
	})
}

//人才账单-重新生成
export function staffRestartCreate(data) {
	return request({
		url: '/bill/restartCreate',
		method: 'POST',
		data: data
	})
}

//人才账单-列表
export function fetchStaffList(data) {
	return request({
		url: '/bill/staffList',
		method: 'POST',
		data: data
	})
}

//人才账单-列表
export function removeOrder(data) {
	return request({
		url: '/paymentOrder/remove',
		method: 'POST',
		data: data
	})
}

//人才账单-详情接口
export function getBillInfo(data) {
	return request({
		url: '/bill/getBillInfo',
		method: 'POST',
		data: data
	})
}

// 开通预付
export function openPrepay(data) {
	return request({
		url: '/shop/openPrepay',
		method: 'POST',
		data: data
	})
}

// 店铺账单撤回
export function billShopWithDrawal(data) {
	return request({
		url: '/billShop/withdrawal',
		method: 'POST',
		data: data
	})
}

// 人才账单撤回
export function billWithDrawal(data) {
	return request({
		url: '/bill/withdrawal',
		method: 'POST',
		data: data
	})
}


// WEBPACK FOOTER //
// ./src/api/bill.js